<template>
    <view class="pub_page pub_exchange_log pub_header_padding">
        <pub-head headerName="exchange_log" :headerConfig="headerConfig"></pub-head>
        <div class="pub_page_scroll page_box">
            <div class="lis_box">
                <div class="li" v-for="(li, key) in list" :key="key">
                    <div class="title">{{ li.title }}人脉包</div>
                    <div class="pli">
                        <div class="p p_1">购买时间： <span class="span">{{ li.createTime }}</span></div>
                        <div class="p p_2">最大奖励： <span class="span">金币{{ li.totalReward }}枚</span></div>
                        <div class="p p_3">已领取奖励次数： <span class="span">{{ parseInt(li.dayNum-li.surplusDay) }}次</span>
                        </div>
                        <div class="p p_4">未领取奖励次数： <span class="span">{{ li.surplusDay }}次</span></div>
                        <div class="p p_5">累计获得： <span class="span">{{ li.accumulateReward }}金币</span></div>
                    </div>
                </div>
            </div>
        </div>
    </view>
</template>

<script>
export default {
    data() {
        return {
            pagescrollTop: 0,
            headerConfig: {
                title: '购买记录',//标题栏内容
                left_type: 3,
            },
            list: [],

        };
    },
    onLoad(option) {
        this.getList();
    },
    methods: {
        async getList() {
            const res = await this.$request.get('resource/getOrderList', {});
            // console.log(res);
            if (res.code == 200) {
                this.list = res.result;
            }
        },
    },
};
</script>

<style lang="scss" scoped>
@import "@/common/css/ecology.scss";
</style>
